package server;

import server.handler.WebsocketChannelInitializer;

/**
 * @author Lyoto
 * @Description
 * @Date 2022-11-20 13:19
 * @Version
 **/
public class Worker {
    public void doWork() {
        Server server = new Server();
        try {
            server.childHandler(new WebsocketChannelInitializer<>())
                  .bind(8081)
                  .sync();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
    
    public static void main(String[] args) {
        new Worker().doWork();
    }
    
}
